/** reverse, reserve, 傻傻分不清楚! */
#include<bits/stdc++.h>
using namespace std;
int main() {
  string str("Hello World!");
  cout << str << endl;
  reverse(str.begin(), str.end());
  cout << str << endl;
  return 0;
}
